<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Requests;
use Log;
use App\User;
use App\DataTablesHelper;

class UserController extends Controller
{
    //
    public function getList(){
        return view("user.list");
    }

    public function postUsers(Request $request){
        $params = array(
            "tableName" => "t_user",
            "orderCoumns" => array("user_id"=>"desc"),
        );

        $where = array(
            "EQ" => array(
                "user_id" => $request->input("user_id"),
                "mobile" => $request->input("mobile"),
            ),
            "LIKE" => array(
                "user_name" => $request->input("user_name")
            ),
        );
        
        return DataTablesHelper::getData($request,$params,$where);
    }
}
